<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-4"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<table width="100%" class="verdana12blacknormal">
	<s:form id="form" method="post" action="updateAllGeneralCategory" theme="simple">
		<tr>
			<td height="40" class="sectionheading bottom-border">
				Category Manager Edit List
			</td>
		</tr>
		<tr>
			<td>
				<table width="100%">
					<tbody>
						<tr align="left">
							<td>
								<s:a href="showCategoryManager.htm"
									cssClass="verdana11greynormal">Top</s:a>
								<s:set name="id" value="%{categoryId}" />
								<s:iterator value="generalCategoriesNamesList">
										&nbsp;&gt;
										<s:if test="%{#id == categoryId}">
										<font class="verdana11greynormal"> <s:property value="categoryName"/>
									</s:if>

									<s:else>
										<s:a cssClass="verdana11greynormal"
											href="showCategoryManager.htm?categoryId=%{categoryId}">
											<s:property value="categoryName"/>
										</s:a>
									</s:else>
								</s:iterator>
							</td>
						</tr>
					</tbody>
				</table>
			</td>
		</tr>
		<tr>
			<td>
				<s:actionerror cssClass="note-red"/>
				<s:fielderror cssClass="note-red"></s:fielderror>
			</td>
		</tr>
		<s:if test="%{generalCategoriesList.size>0}">
		<tr>
			<td>
				<s:iterator value="generalCategoriesList" status="rowstatus">

					<s:hidden name="generalCategoriesMap[%{categoryId}].categoryId"
						value="%{categoryId}" />
					<s:hidden name="generalCategoriesMap[%{categoryId}].sortOrder"
						value="%{sortOrder}" />
					<s:hidden
						name="generalCategoriesMap[%{categoryId}].generalCategories.categoryId"
						value="%{generalCategories.categoryId}" />
					<s:hidden name="generalCategoriesMap[%{categoryId}].categoryTeaser"
						value="%{categoryTeaser}" />
					<s:hidden
						name="generalCategoriesMap[%{categoryId}].categoryType.id"
						value="%{categoryType.id}" />
					<s:hidden name="generalCategoriesMap[%{categoryId}].description"
						value="%{description}" />
					<s:hidden name="generalCategoriesMap[%{categoryId}].level"
						value="%{level}" />
					<s:hidden name="generalCategoriesMap[%{categoryId}].sequence"
						value="%{sequence}" />
					<s:hidden name="generalCategoriesMap[%{categoryId}].mainParentId"
						value="%{mainParentId}" />
					<s:hidden name="generalCategoriesMap[%{categoryId}].active"
						value="%{active}" />
					<s:hidden name="generalCategoriesMap[%{categoryId}].accept"
						value="%{accept}" />

					<table border="0" cellpadding="2" cellspacing="0" width="100%">
						<tbody>
							<tr>
								<td width="50%" align="right" class="verdana12Greybold">
									<s:text name="generalCategoriesMap[%{categoryId}].categoryName"></s:text>

								</td>
								<td width="50%">
									<s:textfield theme="simple" cssClass="Textfiled-border"
										name="generalCategoriesMap[%{categoryId}].categoryName"
										size="30"></s:textfield>
								</td>
							</tr>
						</tbody>
					</table>
				</s:iterator>
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<s:submit type="image" src="../Admin-Images/save-chagnes-button.gif" />
				<img style="cursor: pointer;" onclick="document.getElementById('form').reset();" src="../Admin-Images/reset-button.gif" alt="Reset">
			</td>
		</tr>
		</s:if>
		<s:else>
			<tr align="left" height="25">
				<td COLSPAN="6" align="left" bgcolor="#FFFFFF"
					class="verdana12darkgreybold">
					<br>
					No SubCategories available.
					<br>
				</td>
			</tr>

			<tr>
				<td colspan="2" align="center">
					<img onclick="history.go(-1);" style="cursor: pointer;"
						src="../Admin-Images/ok-button.gif" alt="Cancel">
				</td>
			</tr>
		</s:else>
	</s:form>
</table>